package UseString.demo03;

import java.util.StringJoiner;

public class TestStringjoiner {
    public static void main(String[] args) {
        // 拼接字符串设置前后拼接字符串
        StringJoiner sj = new StringJoiner(",","[","]");
        sj.add("我");
        sj.add("喜欢");
        sj.add("你");
        System.out.println(sj);
        // 获取长度
        System.out.println(sj.length());
        // 转化为string
        System.out.println(sj.toString());

    }
}
